@screenDefaultWidth: 1200px;

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

#wrapper {
  min-height: 88vh;
}

//导航栏
.topbar {

  background-color: #0052CC;
  width: 100%;
  -webkit-box-flex: 0;
  -webkit-flex: none;
  -moz-box-flex: 0;
  -ms-flex: none;
  flex: none;
  z-index: 1000;
  position: relative;

  a {
    color: #ffffff;

    &:hover {
      background-color: #0747A6;
      -webkit-border-radius: 3px;
      -moz-border-radius: 3px;
      border-radius: 3px;
    }

    &::after {
      content: none !important;
    }
  }

  .topbar-container {
    height: 88px;
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
    padding-left: 70px;
    padding-right: 70px;
    max-width: @screenDefaultWidth;

    .topbar-logo {
      margin-bottom: 0.5rem;

      a:hover {
        background: none;
      }
    }

    > ul {
      display: flex;
      list-style: none;

      > li > a {
        display: block;
        height: 32px;
        line-height: 32px;
        padding-right: 40px;
        padding-left: 10px;
      }
    }

    .topbar-menu {
      flex-grow: 1;

      //鼠标移动到菜单上方，列出子菜单同时标记父类菜单颜色
      .am-dropdown-hover {
        &:hover {
          > a {
            background: #0747A6;
          }

          > .doc-layer, > .am-dropdown-layer {
            display: block;
          }
        }

        > .am-dropdown-layer {
          width: auto;
          padding: 10px 300px;

          ul {

            position: absolute;
            top: 18px;
            left: 0;
            list-style: none;
            min-width: 160px;
            background: #fff;
            border: 1px solid #cfd1c5;
            border-radius: 5px;
            padding: 0;

            &::before, &::after {
              position: absolute;
              left: 10px;
              top: -16px;
              display: block;
              content: "";
              width: 0;
              height: 0;
              border: 8px dashed transparent;
              z-index: 1;
            }

            &::before {
              border-bottom-color: #d7dae2;
            }

            &::after {
              border-bottom-color: #fff;
            }


            li {
              position: relative;

              &:hover {
                > a {
                  background: #f5f5f5;
                }
              }

              > .am-dropdown-layer {
                right: -51px;
                top: -1px;
                padding: 25px;

                ul {
                  position: absolute;
                  left: 10px;
                  top: 0;

                  &::before, &::after {
                    left: -16px;
                    top: 8px;
                    transform: rotate(270deg);
                  }

                }
              }
            }

            > li > a {
              display: block;
              padding: 6px 20px;
              clear: both;
              font-weight: 400;
              color: #606266;
              white-space: nowrap;

              &:hover {
                color: #545559 !important;
                background-color: #f5f5f5;
              }

            }
          }
        }

      }

      //对子菜单进行隐藏
      .am-dropdown-layer, .doc-layer {
        display: none;
      }

      //文档菜单进行位置布局
      .doc-layer {
        width: 100% !important; //覆写子菜单宽度问题
        left: 0;
        top: 50px;
        padding-bottom: 38px !important;

        ul {
          border: none !important;
          min-width: auto !important;
          position: relative !important;

          &::before, &::after {
            content: none !important;
          }
        }
      }

      .topbar-submenu {
        width: 100%;
        min-height: 30vh;
        background-color: #fff;
        top: 38px;
        border: none;
        border-radius: 0;
        margin: 0;

        &::before, &::after {
          content: none;
        }

        a {
          color: #42526E;

          &:hover {
            color: #42526E !important;
            text-decoration: none;
            background-color: #F4F5F7;
          }
        }

        ul {
          list-style: none;
          width: 1000px;
          display: flex;
          flex-wrap: wrap;
          justify-content: flex-start;
          margin: 0 auto;

          li {
            width: 33%;
            margin-bottom: 20px;

            a {
              display: block;
              line-height: 32px;
              padding-right: 40px;
              padding-left: 10px;

              img {
                width: 40px;
                height: 40px;
              }
            }
          }
        }
      }
    }
  }

  //右栏样式
  .am-topbar-right {

    a:hover, a:focus {
      color: #fff !important;
    }

    .am-dropdown-content > li > a:hover {
      color: #545559 !important;
      background-color: #f5f5f5;
    }

    .am-topbar-btn {
      margin-top: 0;
    }

    .am-btn-login {
      background-color: transparent;
      color: #fff !important;;
      border: 1px solid #fff;

      &:hover {
        background-color: #4373FB;
      }
    }

    .am-btn-signup {
      color: #05f !important;

      &:hover {
        color: #05f !important;
        background-color: #e5eeff;
        border: 1px solid #e5eeff !important;
      }
    }

  }


  @media only screen and (max-width: 640px) {
    .topbar-container {
      max-width: none;
      padding: 0 0.5rem;
      justify-content: space-between;

      .topbar-logo {
        font-size: 2rem;
      }

      .topbar-menu {
        display: none;
      }

      .am-topbar-right {
        .am-nav {
          li {
            display: inline-block;
          }
        }
      }

    }
  }

}

//文章导航栏
.article-topbar {
  height: 50px;
  z-index: 1000;

  .topbar-container {
    position: fixed;
    width: 100%;
    background-color: #0052CC;
    height: 50px;
    padding-left: 5px;
    max-width: none;

    .topbar-menu {
      margin-top: 1.6rem;
      padding-left: 0px;

      > li + li::before {
        content: "» ";
        color: rgb(204, 204, 204);
        padding: 0px 8px;
      }

      > li > a {
        display: inline-block;
        padding: 0 10px;
      }

      .topbar-submenu {
        top: 50px !important;

        ul {
          width: 100%;

          li {
            width: 25%;
          }
        }

      }
    }


  }

  @media only screen and (max-width: 640px) {
    .topbar-container {
      .topbar-menu {
        font-size: 1.2rem;
        display: flex;

        li {
          display: inline-block;
          overflow: hidden;

          &:first-child {
            display: none;
          }

          &:nth-child(2) {
            width: 12rem;
            text-overflow: ellipsis;
            white-space: nowrap;

            &::before {
              content: none;
            }
          }

          .topbar-submenu {
            max-height: 70vh;
            overflow-y: auto;
            border-bottom: 1px solid #c7c7c7;
            padding: 1rem 0.5rem 0 0.5rem;

            > ul {
              padding: 0 1rem;

              > li {
                width: 100%;
                padding: 1rem 0;
                border-bottom: 1px solid #e9ecf2;
                margin-bottom: 0;

                &:first-child {
                  display: block;
                }

                &:last-child {
                  border-bottom: none;
                }

                a {
                  padding: 0rem 0.5rem;

                  img {
                    width: 4rem;
                    height: 4rem;
                  }
                }
              }
            }

          }
        }


      }

      .am-topbar-right {
        display: none;
      }
    }

  }

}


/*
===================
文章的边栏
===================
*/
.sidebar {
  position: fixed;
  //border-right: 1px solid rgba(0, 0, 0, .07);
  overflow-y: auto;
  padding: 0;
  top: 51px;
  bottom: 0;
  left: 0;
  transition: transform .25s ease-out;
  width: 300px;
  z-index: 3;
  background: #F5F7F9;

  &::-webkit-scrollbar {
    width: 4px
  }

  &::-webkit-scrollbar-thumb {
    /* background:transparent; */
    /* border-radius:4px; */
  }

  &:hover {
    &::-webkit-scrollbar-thumb {
      background: hsla(0, 0%, 53%, .4)
    }

    &::-webkit-scrollbar-track {
      background: hsla(0, 0%, 53%, .1)
    }
  }

  h2 {
    font-size: 1.5em;
    margin-top: 5px;
  }

  .search input, .search .search-article, .search input:focus {
    border-width: 0 0 1px 0;
    border-color: #ccc;
    -webkit-box-shadow: none;
    box-shadow: none;
    border-radius: 0;
  }

  .am-selected-btn {
    border-radius: 0;
  }

  .search .search-article {
    background-color: #fff;
  }

  .sidebar-nav {
    line-height: 2em;
    padding-bottom: 40px;
  }

  ul {
    list-style: none;
    color: #0e90d2;
    font-size: 15px;
    margin: 0 0 0 15px;
    padding: 0;

    li {
      //padding: 6px 0;
      span, a {
        padding: 6px 0;
        display: block;
      }

      &.am-active {
        border-right: 3px solid #5eb95e;

        a {
          color: #5eb95e;
        }
      }

      a {
        margin-left: 10px;
        color: #666;
        font-weight: 400;
        overflow: hidden;
        text-decoration: none;
        text-overflow: ellipsis;

        &:hover {
          color: #5eb95e;
        }
      }
    }
  }

  .am-selected-list {
    margin: 0 !important;
    color: #333;

    .am-checked {
      color: #CCCCCC;
    }
  }

  .sidebar-nav ul li {
    cursor: pointer;
  }

  .sidebar-hide {
    display: none;
  }

  @media only screen and (max-width: 640px) {
    display: none;
    background: #fdfdfd;
    animation: bounceInLeft 0.6s infinite cubic-bezier(0.6, 0.9, 0.1, 1.000);
    animation-iteration-count: 1;
    top: 0;
    z-index: 1002;

    @keyframes bounceInLeft {
      0% {
        opacity: 0;
        transform: translate3d(-3000px, 0, 0);
      }
      60% {
        opacity: 1;
        transform: translate3d(25px, 0, 0);
      }
      75% {
        transform: translate3d(-10px, 0, 0);
      }
      90% {
        transform: translate3d(5px, 0, 0);
      }
      100% {
        transform: none;
      }
    }
  }

}

//手机版文档目录的遮罩层
@media only screen and (max-width: 640px) {
  .mask-layer {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(3, 14, 27, .7);
    transition: opacity 1s ease-in-out;
    z-index: 1001;
    display: none;
  }
}


/*
===================
文章内容区
===================
*/
.content {
  padding-top: 30px;
  margin: 0 50px 0 350px;
  transition: left .25s ease;

  .am-article-title {
    font-size: 3.2rem;
  }


  .am-article-hd {
    margin-bottom: 2rem;

    h1 {
      padding-bottom: 1rem;
      border-bottom: 1px solid #ccc;
      margin-bottom: 1rem;

    }

    small {
      color: #b5b5b5;
    }

    .am-u-sm-12 {
      @media only screen and (max-width: 640px) {
        text-align: left !important;
      }
    }

    .font-set {
      cursor: pointer;
    }

  }

  .am-article-bd {
    min-height: 60vh;

    img {
      border: 1px solid #ebeef5;
      background-color: #fff;
      color: #303133;
      transition: .3s;
      border-radius: 5px;
      box-shadow: 0px 0px 12px rgba(0, 0, 0, .12);

      &:hover {
        box-shadow: 0 2px 30px rgb(0 0 0 / 22%), 0 2px 5px rgb(0 0 0 / 10%) !important;
      }

    }

    pre {
      .pes-code-copy {
        font-size: 130%;
        cursor: pointer;
      }

    }

  }


  .am-article-hd, .am-article-bd {
    padding: 0 15px;

    h2 {
      border-left: 4px solid #ff7e7e;
      padding-left: 10px;
      margin-left: -15px;
    }

    h1, h2, h3, h4, h5, h6 {
      .article-copy-link {
        cursor: pointer;
        display: none;
      }

      &:hover > .article-copy-link {
        display: inline-block;
      }
    }
  }

  .am-pagination {
    li > a {
      color: #606266;
      border: none;
      padding: 0;

      &:hover, &:focus {
        color: #5eb95e;
        background: none;
      }
    }
  }

  .pes-like {
    cursor: pointer;
  }

  @media only screen and (max-width: 640px) {
    width: auto;
    margin: 0 auto;
    padding: 1rem;
  }

  //版权声明
  .pes-doc-copyright {
    margin-top: 10px;
    padding: 5px;
    border: 2px dashed #cfcfcf;

    p:last-child {
      margin-bottom: 5px;
    }
  }

}

/*
===================
标题导航
===================
*/
.title-nav {
  padding-left: 0;
  border-left: 1px solid #efefef;
  position: fixed;
  right: 0px;
  top: 51px;
  background: #fff;
  width: 0px;
  height: 95vh;

  z-index: 999;

  .title-nav-hide {
    background-color: #efefef;
    border-radius: 10px 0 0 10px;
    border-width: 1px 0px 1px 1px;
    border-color: #efefef;
    border-style: solid;
    cursor: pointer;
    padding: 20px 4px 20px 5px;
    z-index: 1000;
    left: -19px;
    position: absolute;
    top: 50%;
  }

  .title-nav-content {
    height: 100%;
    overflow-y: scroll;
    overflow-x: hidden;
    overflow: -moz-scrollbars-none;

    &::-webkit-scrollbar {
      width: 0 !important
    }
  }


  ul {
    list-style: disc;
    margin: 0.5rem 0;

    li.active > a {
      color: #E6A23C;
      font-weight: 500;
    }

  }

  a {
    text-decoration: none;
    display: block;
    padding: .125rem 0;
    color: #656262;
    transition: all 50ms ease-in-out;

    &:hover, :focus {
      color: #E6A23C;
    }
  }

}

#super-ad {

  max-width: 1200px !important;

  > .am-g > .am-u-sm-12 {
    display: flex;

    > .am-panel {
      width: 800px;
    }

    .super-sidebar {
      width: 400px;
      margin-left: 10px;
    }

  }

  //公告栏
  .announcement-container {
    display: flex;
    align-items: center;
    height: 50px;
    background-color: #f5f8fc;
    color: #1d1d1f;
    overflow: hidden;
    position: relative;

    a {
      color: #333;

      &:hover {
        color: #5eb95e;
      }
    }

    .am-icon-bullhorn {
      margin: 0 10px;
    }

    .am-text-danger {
      position: absolute;
      right: 5px;
    }

    .announcement {
      display: flex;
      align-items: center;
      white-space: nowrap;
      position: relative;

      div {
        width: 100%;
        position: absolute;
        display: none;
      }

      .active {
        display: block;
      }

      .inactive {
        display: none;
      }
    }
  }
}


@import "index";
@import "search";
@import "status";
@import "login";
@import "footer";
@import "api-table";
@import "api-indicator";
@import "readTips";

